package com.xshang.controller.superadmin;

import com.xshang.entity.bo.ShopCategory;
import com.xshang.entity.dto.Result;
import com.xshang.service.solo.ShopCategoryService;
import org.simplespringframework.annotation.Controller;
import org.simplespringframework.inject.annotation.Autowired;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * @BelongsProject: simpleframework
 * @BelongsPackage: com.xshang.controller.superadmin
 * @Author: xshang
 * @CreateTime: 2023-06-23  18:25
 * @Description: TODO
 * @Version: 1.0
 */
@Controller
public class ShopCategoryOperationController {

    @Autowired
    private ShopCategoryService shopCategoryService;

    public Result<Boolean> addShopCategory(HttpServletRequest request, HttpServletResponse response) {
        // TODO 参数校验请求参数解析
        return shopCategoryService.addShopCategory(null);
    }

    public Result<Boolean> removeShopCategory(HttpServletRequest request, HttpServletResponse response) {
        // TODO 参数校验请求参数解析
        return shopCategoryService.removeShopCategory(0);

    }

    public Result<Boolean> modifyShopCategory(HttpServletRequest request, HttpServletResponse response) {
        // TODO 参数校验请求参数解析
        return shopCategoryService.modifyShopCategory(null);

    }

    public Result<ShopCategory> queryShopCategoryById(HttpServletRequest request, HttpServletResponse response) {
        // TODO 参数校验请求参数解析
        return shopCategoryService.queryShopCategoryById(0);

    }

    public Result<List<ShopCategory>> queryShopCategory(HttpServletRequest request, HttpServletResponse response) {
        // TODO 参数校验请求参数解析
        return shopCategoryService.queryShopCategory(null,1,100);

    }
}
